package com.zhang.pojo;

import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 订单明细实体类
 */
@Data
@NoArgsConstructor
public class OrderInfoBean {
    /**明细Id*/
    private int infoId;
    /**购买商品*/
    private ProductBean productBean;
    /**购买数量*/
    private int num;
    /**成交价格*/
    private int price;

    public OrderInfoBean(int productId, int num,int price) {
        this.productBean = new ProductBean();
        productBean.setProductId(productId);
        this.num = num;
        this.price = price;
    }

    @Override
    public String toString() {
        return "OrderInfoBean{" +
                "infoId=" + infoId +
                ", productBean=" + productBean +
                ", num=" + num +
                '}'+"\n";
    }
}
